//
//  SubjectParser.m
//  ITrip
//
//  Created by dllo on 15/5/22.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "SubjectParser.h"

@implementation SubjectParser

+(NSMutableArray *)getParser:(NSData *)data{

    NSMutableArray *dataArray = [NSMutableArray array];
    NSArray *array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    for (NSDictionary *dic in array) {
        SubjectModel *model = [SubjectModel getModel];
        model.id = [[dic objectForKey:@"id"] integerValue];
        model.name = [dic objectForKey:@"name"];
        model.title = [dic objectForKey:@"title"];
        model.image_url = [dic objectForKey:@"image_url"];
        [dataArray addObject:model];
    }
    return dataArray;
}


@end
